
/**
*This class represents the players ship throughout the game. 
*It has a getter method that gets the amount of fuel the ship has.
*
* @author Anna
* @version 1.0
*/
public class Ship implements java.io.Serializable{ // $codepro.audit.disable com.instantiations.assist.eclipse.analysis.audit.rule.effectivejava.alwaysOverridetoString.alwaysOverrideToString
	
	/**
	 *  Field fuel
	 */
	private int fuel;
	
	/**
	 * Field cargo
	 */
	private int cargo;
	
	/**
	 * Field maxBay
	 */
	private int maxBay;
	
	/**
	 * Field goods
	 */
	private Goods [] goods; // $codepro.audit.disable variableShouldBeFinal
	
	/**
	* this ship() constructor sets the starting fuel level for the ship at 20 
	* and creates a ship object when called
	*/	
	public Ship(){
		fuel=20; // $codepro.audit.disable numericLiterals
		cargo=0;
		maxBay=15; // $codepro.audit.disable numericLiterals
		goods = new Goods[10]; // $codepro.audit.disable numericLiterals
		for(int i=0; i < 10; i++){ // $codepro.audit.disable numericLiterals
			goods[i]=new Goods();
		}
	}
	
	/**
	* this getFuel() method gets the new amount of fuel 
	* the ship has after traveling a certain distance.
	*
	* @return fuel- returns the fuel level of the ship
	*/
	public int getFuel(){
		return fuel;
	}
	
	/**
	*getter method for the cargo
	*
	*@return cargo
	*/
	public int getCargo() {
		// TODO Auto-generated method stub
		return cargo;
	}
	
	/**
	 * setter method for the cargo
	 * 
	 * @param i
	 */
	public void setCargo(int i) {
		// TODO Auto-generated method stub
		cargo=i;	 // $codepro.audit.disable whiteSpaceUsage
	}
	
	/**
	*getter method for the maxCargoBay
	*
	*@return maximum cargo bay
	*/
	public int getMaxBay() {
		// TODO Auto-generated method stub
		return maxBay;
	}
	
	/**
	*helper method that sets the maxCargoBay
	*
	*@param i The maximum number of items the cargo bay can hold
	*/
	public void setMaxBay(int i) {
		// TODO Auto-generated method stub
		maxBay=i;
		
	}
	
	/**
	*helper method that sets the amount of fuel
	*
	*@param fuel The amount of fuel the ship has
	*/
	public void setFuel(int fuel) {
		// TODO Auto-generated method stub
		this.fuel= fuel;
	}
	
	/**
	*getter method for the goods
	*
	*@return goods
	*/
	public Goods[] getGoodsArray(){
		return goods;
	}
}
